Skip to content

Conversation

@rbygrave
Copy link

No description provided.


private void writeName(Key name) {
writeComma();
final char[] escaped = name.toCharArray();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nb: char[] escaped includes the quotes

JsonMessages.GENERATOR_ILLEGAL_METHOD(currentContext.scope));
}
writeName(name);
stack.push(currentContext);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could refactor extract these 4 lines as they are the same as the lines from writeKey(String name)

}

private static String quoteEscape(CharSequence string) {
StringBuilder builder = new StringBuilder();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same escape logic as JsonGeneratorImpl.writeEscapedString() but writes to the StringBuilder instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant